﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Plexi
{
	public class PolarInfo
	{
		public float ArcticLatitude { get; set; }
		public float AntarcticLatitude { get; set; }
	}

	/// <summary>Handles data about polar circles that were loaded from config via the ConfigLoader.</summary>
	public class PolarCircles
	{
		private Dictionary<int, PolarInfo> _dict = null;
		private PolarInfo _p;

		public PolarCircles()
		{
			_dict = new Dictionary<int, PolarInfo>();
		}

		public void Add(int index, PolarInfo pi)
		{
			_dict.Add(index, pi);
		}

		/// <summary>If the given celestial body should have ice only on its poles, returns the latitudes of its polar circles. Otherwise returns null.
		/// <para>
		/// Data is from the config file, see ConfigLoader.
		/// </para></summary>
		public PolarInfo GetPolarInfo(int bodyIndex)
		{
			if (_dict.TryGetValue(bodyIndex, out _p))
				return _p;
			return null;
		}
	}
}
